<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>MiXiM: Mac80211MultiChannel Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>


</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">MiXiM
   &#160;<span id="projectnumber">2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('a00129.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Mac80211MultiChannel Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Mac80211MultiChannel" --><!-- doxytag: inherits="Mac80211" -->
<p>Adds multi channel support to <a class="el" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>.  
 <a href="a00129.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="a00436_source.html">Mac80211MultiChannel.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for Mac80211MultiChannel:</div>
<div class="dyncontent">
<div class="center"><img src="a00836.png" border="0" usemap="#Mac80211MultiChannel_inherit__map" alt="Inheritance graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for Mac80211MultiChannel:</div>
<div class="dyncontent">
<div class="center"><img src="a00837.png" border="0" usemap="#Mac80211MultiChannel_coll__map" alt="Collaboration graph"/></div>
<center><span class="legend">[<a target="top" href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="a00838.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#ac67b9dae263f63f29d7be1d4337e3a9c">switchChannel</a> (int channel)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Tells the MAC layer to switch to the passed channel.  <a href="#ac67b9dae263f63f29d7be1d4337e3a9c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#abe1654a1a6dfdad14fc96559cf6265bd">getChannel</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the currently used channel.  <a href="#abe1654a1a6dfdad14fc96559cf6265bd"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00129.html#aa7351afc794f983e34dbc86d63cb3dea">initialize</a> (int stage)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialization of the module and some variables.  <a href="#aa7351afc794f983e34dbc86d63cb3dea"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Adds multi channel support to <a class="el" href="a00128.html" title="An implementation of the 802.11b MAC.">Mac80211</a>. </p>
<p>Multi channel support enables the MAC layer to change the channel for transmission and reception during simulation.</p>
<dl class="author"><dt><b>Author:</b></dt><dd>Karl Wessel </dd></dl>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abe1654a1a6dfdad14fc96559cf6265bd"></a><!-- doxytag: member="Mac80211MultiChannel::getChannel" ref="abe1654a1a6dfdad14fc96559cf6265bd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Mac80211MultiChannel::getChannel </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the currently used channel. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The currently used channel. </dd></dl>

<p>References <a class="el" href="a00134.html#a6271dfe09bf5cef8c8afb96de00182ab">MacToPhyInterface::getCurrentRadioChannel()</a>, and <a class="el" href="a00026.html#aa7b1e6bdb734765a9f4eff7d486dfbea">BaseMacLayer::phy</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keywordflow">return</span> <a class="code" href="a00026.html#aa7b1e6bdb734765a9f4eff7d486dfbea" title="Handler to the physical layer.">phy</a>-&gt;<a class="code" href="a00134.html#a6271dfe09bf5cef8c8afb96de00182ab" title="Returns the channel currently used by the radio.">getCurrentRadioChannel</a>();
}
</pre></div>
</div>
</div>
<a class="anchor" id="aa7351afc794f983e34dbc86d63cb3dea"></a><!-- doxytag: member="Mac80211MultiChannel::initialize" ref="aa7351afc794f983e34dbc86d63cb3dea" args="(int stage)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mac80211MultiChannel::initialize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>stage</em></td><td>)</td>
          <td><code> [protected, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Initialization of the module and some variables. </p>
<p>First we have to initialize the module from which we derived ours, in this case <a class="el" href="a00025.html" title="A very simple layer template.">BaseLayer</a>. </p>

<p>Reimplemented from <a class="el" href="a00128.html#ab81dae24d79c2ef010301e2c219966c1">Mac80211</a>.</p>
<div class="fragment"><pre class="fragment">{
    <a class="code" href="a00129.html#aa7351afc794f983e34dbc86d63cb3dea" title="Initialization of the module and some variables.">Mac80211::initialize</a>(stage);

    <span class="keywordflow">if</span> (stage == 0)
    {
    }
    <span class="keywordflow">else</span> <span class="keywordflow">if</span> (stage == 1)
    {
    }
}
</pre></div>
</div>
</div>
<a class="anchor" id="ac67b9dae263f63f29d7be1d4337e3a9c"></a><!-- doxytag: member="Mac80211MultiChannel::switchChannel" ref="ac67b9dae263f63f29d7be1d4337e3a9c" args="(int channel)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Mac80211MultiChannel::switchChannel </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>channel</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Tells the MAC layer to switch to the passed channel. </p>
<p>This method can be used by upper layers to change the channel. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">channel</td><td>The channel to switch to, must be 1&lt;=channel&lt;=14. </td></tr>
  </table>
  </dd>
</dl>

<p>References <a class="el" href="a00128.html#a67eba657efe23f5e5c21904f4744261d">Mac80211::centerFreq</a>, <a class="el" href="a00026.html#aa7b1e6bdb734765a9f4eff7d486dfbea">BaseMacLayer::phy</a>, and <a class="el" href="a00134.html#a2e770727361fe1774b88d5667b89417e">MacToPhyInterface::setCurrentRadioChannel()</a>.</p>
<div class="fragment"><pre class="fragment">{
    <span class="keywordflow">if</span> (!(1 &lt;= channel &amp;&amp; channel &lt;= 14))
    {
        opp_error(<span class="stringliteral">&quot;Invalid channel %d. Mac tried to switch to a channel not&quot;</span>
                <span class="stringliteral">&quot; supported by this protocoll.&quot;</span>, channel);
    }
    <a class="code" href="a00026.html#aa7b1e6bdb734765a9f4eff7d486dfbea" title="Handler to the physical layer.">phy</a>-&gt;<a class="code" href="a00134.html#a2e770727361fe1774b88d5667b89417e" title="Sets the channel currently used by the radio.">setCurrentRadioChannel</a>(channel);

    <a class="code" href="a00128.html#a67eba657efe23f5e5c21904f4744261d" title="Stores the center frequency the Mac uses.">centerFreq</a> = CENTER_FREQUENCIES[channel];
}
</pre></div>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/mac/<a class="el" href="a00436_source.html">Mac80211MultiChannel.h</a></li>
<li>D:/Projects/MiXiM/extsrc/mixim/src/modules/mac/Mac80211MultiChannel.cc</li>
</ul>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="a00129.html">Mac80211MultiChannel</a>      </li>

    <li class="footer">Generated on Tue Mar 5 2013 21:26:32 for MiXiM by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
